<?php
  include('./init.php');
  $res = mysql_query("SELECT file_name FROM bj_audio WHERE file_title='". mysql_real_escape_string(base64_decode($_GET['song'])) . "'");
  if ($res !== FALSE && mysql_num_rows($res)) {
    $lin=mysql_fetch_assoc($res);
  } 

  //$song = str_replace(".mp3", "", "$_GET[song]");
  $song = str_replace('.mp3', '', stripslashes($lin['file_name']));
?>
<div style="background-color: #9CAAB5; text-align: center; color: white;">Email <?php echo $song; ?> to a friend.</div>
<div align="center">
    <table width="95%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="style14">Song File </td>
        <td><font face="Arial,Helvetica">
          <input name="song" type="text" class="email_input" id="song" value="<?php echo $song; ?>" size="30" readonly="true">
        </font></td>
      </tr>
      <tr>
        <td class="style14">Your Name </td>
        <td><font face="Arial,Helvetica">
          <input name="uname" id="uname" type="text" class="email_input" size="30">
        </font></td>
      </tr>
      <tr>
        <td class="style14">Your Email Address </td>
        <td><font face="Arial,Helvetica">
          <input name="uemail" id="uemail" type="text" class="email_input" size="30">
        </font></td>
      </tr>
      <tr>
        <td class="style14">Friend's Name </td>
        <td><font face="Arial,Helvetica">
          <input name="fname" type="text" class="email_input" id="fname" size="30">
        </font></td>
      </tr>
      <tr>
        <td class="style14"><strong>Friend's Email Address</strong></td>
        <td><font face="Arial,Helvetica">
          <input name="femail" type="text" class="email_input" id="femail" size="30">
        </font></td>
      </tr>
      <tr>
        <td align="center" class="style7" colspan="2">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td><input name="Button" type="button" style="width: 120px" value="Send Email" onclick="EmailSong.SendEmail()"></td>
							<td><input name="Button" type="button" style="width: 120px" onClick="EmailSong.closeContent();" value="Cancel"></td>
						</tr>
					</table>
        </td>
      </tr>
    </table>
</div>